﻿using System;
using System.Collections.Generic;
using DistributeTransaction.DAL;
using DistributeTransaction.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;

namespace DistributeTransaction.Tests
{
    
    
    /// <summary>
    ///This is a test class for OrderRepositoryTest and is intended
    ///to contain all OrderRepositoryTest Unit Tests
    ///</summary>
    [TestClass()]
    public class OrderRepositoryTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for OrderRepository Constructor
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void OrderRepositoryConstructorTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for CancelOrder
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void CancelOrderTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            int orderId = 0; // TODO: Initialize to an appropriate value
            target.CancelOrder(orderId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for CheckOut
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void CheckOutTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            Order order = null; // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.CheckOut(order, userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetOrderByID
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void GetOrderByIDTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            int orderId = 0; // TODO: Initialize to an appropriate value
            IEnumerable<OrderDetail> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<OrderDetail> actual;
            actual = target.GetOrderByID(orderId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetOrderPayments
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void GetOrderPaymentsTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            Decimal amount = new Decimal(); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            Order expected = null; // TODO: Initialize to an appropriate value
            Order actual;
            actual = target.GetOrderPayments(amount, userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetOrders
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void GetOrdersTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            IEnumerable<Order> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<Order> actual;
            actual = target.GetOrders(userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetRecentlyOrder
        ///</summary>
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [TestMethod()]
        [HostType("ASP.NET")]
        [UrlToTest("http://localhost:12483")]
        public void GetRecentlyOrderTest()
        {
            DatabaseContext context = null; // TODO: Initialize to an appropriate value
            OrderRepository target = new OrderRepository(context); // TODO: Initialize to an appropriate value
            Guid userId = new Guid(); // TODO: Initialize to an appropriate value
            Order expected = null; // TODO: Initialize to an appropriate value
            Order actual;
            actual = target.GetRecentlyOrder(userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
